Many programs that perform computationally intensive calculations perform the calculations on data managed by a database system. Thus, a typical calculation operation involves transferring a copy of the data from the database system to the application that performs the calculations (the “computationally intensive application”). Because the amount of data used by a computationally intensive application can be massive, it is often not practical to extract all of the data from the database. Instead, a selective subset of the data may be transferred to the computationally intensive application. However, results generated based on only a subset of the available data tend to be less accurate than results generated based on all of the available data. Thus, it is clearly desirable to address the problems of massive data transfer and less accurate results inherent in existing approaches.